#include <iostream>
#include <math.h>
#include <conio.h>

using namespace std;

int main(int argc, char argv[])
{
	int n;
	double *mas;
	double sum = 0.0;

	cout << "vvedite razmer massiva: ";
	cin >> n;
	n = abs(n);

	mas = (double*)(malloc(n*sizeof(double)));

	for(int i=0; i<n; i++)
	{
		cout << "vvedite " << i+1 << " element massiva: ";
		cin >> mas[i];
		sum += mas[i];
	}

	cout << "summa elementov masssiva: " << sum;

	free(mas);

	getch();

	return 0;
}